﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OnlineCourse.Model.Entity;
using System;
using System.Collections.Generic;
using System.Text;

namespace OnlineCourse.Model.EntityConfiguration
{
    public class CourseConfiguration : IEntityTypeConfiguration<Course>
    {
        public void Configure(EntityTypeBuilder<Course> builder)
        {
            builder.Property(a => a.Id).HasDefaultValueSql("newid()");
            builder.Property(a => a.Price).HasColumnType("decimal(18,6)");
        }
    }
}
